package com.lin.lazybone.ui;

/*
 *  描述：    自定义Dialog
 */

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.view.WindowManager;
import com.lin.lazybone.R;


public class CustomDialog extends Dialog
{

    public CustomDialog(Context context, int width, int height, int layout, int style, int gravity, int anim)
    {
        super(context, style);
        //设置属性
        setContentView(layout);
        Window window = getWindow();
        WindowManager.LayoutParams layoutParams = window.getAttributes();
        layoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
        layoutParams.height = height;
        layoutParams.gravity = gravity;
        window.setAttributes(layoutParams);
        window.setWindowAnimations(R.style.pop_anim_style);
    }
}
